package java_DesignPattern.BehavioralPattern.StatePattern.After;

/**
 * 电梯运行状态类
 */
public class Run extends LiftState {

    @Override
    public void run() {
        System.out.println("电梯运行");
    }

    @Override
    public void stop() {
        //修改电梯状态为停止
        this.systemContext.setLiftState(SystemContext.STOP);
        //调用电梯停止方法
        this.systemContext.stop();
    }

    @Override
    public void open() {

    }

    @Override
    public void close() {

    }
}
